<template>
    <div>
      <table>
        <tr>
          <td>
            用户名
          </td>
          <td>
            等级
          </td>
          <td>
            积分
          </td>

        </tr>
        <tr v-for="item in userlists">
          <td>
            {{ item.username }}
          </td>
          <td>
            {{ item.user_lecel }}
          </td>
          <td>
            {{ item.score }}
          </td>

        </tr>
      </table>
    </div>
</template>

<script>
  import axios from 'axios'
    export default {
        data(){
          return{
            userlists:[]
          }
        },
        mounted() {

          axios({
            url:'http://127.0.0.1:8000/usershow/',
            method:'get',

          }).then(res=>{
            this.userlists = res.data.userlists
          })
        },

    }
</script>

<style scoped>

</style>
